﻿create table BehaviorTrace
(
	[Id] int not null primary key identity,
	[clientIp] varchar(50),
	[userId] varchar(50),
	[beginTime] datetime,
	[completeTime] datetime,
	[httpMethod] varchar(10),
	[requestPath] varchar(200),
	[browser] varchar(50),
	[exchangeData] varchar(max)
)
go
create proc USP_BehaviorTrace_NewRecord
@clientIp varchar(50),
@userId varchar(50),
@beginTime datetime,
@httpMethod varchar(10),
@requestPath varchar(200),
@browser varchar(50),
@exchangeData varchar(max),
@Id int output
as
insert into BehaviorTrace([clientIp],[userId],[beginTime],[httpMethod],[requestPath],[browser],[exchangeData]) 
values(@clientIp,@userId,@beginTime,@httpMethod,@requestPath,@browser,@exchangeData)
set @Id = SCOPE_IDENTITY()
go